package com.hp.appfw.task;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.hp.appfw.service.cust.MessageCenterService;
import com.hp.appfw.service.cust.TaskMonitorService;

@Component
public class TaskStatusUpdateTask {

	private static Logger logger = Logger.getLogger(MessageCenterService.class);
	
	@Resource
	private TaskMonitorService taskService;
	
	@Scheduled(fixedDelay = 5000)
	public void updateStatus()
	{
		taskService.updateStatus();
		logger.info("Update monitor status.");
	}
}
